#ifndef M_PHASE_FUNCTION
#define M_PHASE_FUNCTION
#include"../header.h"
class PhaseFunction
{
public:
	virtual Float p(P3 &wo, P3 &wi) = 0;
	virtual Float sample_p(P3 &wo, P3 *wi, Float *rands) = 0;
};

class HenyeyGreenstein : public PhaseFunction 
{
private:
	const Float g;
	inline Float phase(Float cosTheta);
public:
	HenyeyGreenstein(Float g);
	virtual Float p(P3 &wo, P3 &wi);
	virtual Float sample_p(P3 &wo, P3 *wi, Float *rands);
};

#endif // !M_PHASE_FUNCTION

